
                  var authors = [
                        {
                            "PERSONID": 21,
                            "NAME": "Keen"
                        },
                        {
                            "PERSONID": 22,
                            "NAME": "Ilia"
                        },
                        {
                            "PERSONID": 23,
                            "NAME": "Samaneh"
                        },
                        {
                            "PERSONID": 24,
                            "NAME": "Chong"
                        }
                    ];


                    var comments = [
                        {
                            "ID":23,
                            "DATECREATED":"2010-10-11",
                            "DATEMODIFIED":"2010-10-11",
                            "ANNOTATIONBODY":"this is my first note<br/><b>and this is another line</b>"
                            ,"STRINGDESCRIPTION":"",
                            "ANNOTATIONURI":"",
                            "LEXICALSIGNATURE":null,
                            "PAGENUMBER":1,
                            "APPLICATION":"multivalent\/fab4",
                            "VERSION":null,
                            "RESOURCEID":21,
                            "PERSONID":21,
                            "ANNOFABID":"eleni-1f8a264404dc4e9f",
                            "REPLYTO":null,
                            "REPLYTOFABID":null,
                            "HASREPLY":"y",
                            "TYPE":"note",
                            "RATEBYANNO":1,
                            "CHILDREN":[
                                {
                                    "ID":25,
                                    "DATECREATED":"2010-10-12",
                                    "DATEMODIFIED":"2010-10-12",
                                    "ANNOTATIONBODY":"it's a reply to the first comment",
                                    "STRINGDESCRIPTION":"",
                                    "ANNOTATIONURI":"",
                                    "LEXICALSIGNATURE":null,
                                    "PAGENUMBER":1,
                                    "APPLICATION":"multivalent\/fab4",
                                    "VERSION":null,
                                    "RESOURCEID":21,
                                    "PERSONID":24,
                                    "ANNOFABID":"eleni-5181f3f62a52e578",
                                    "REPLYTO":23,
                                    "REPLYTOFABID":"eleni-1f8a264404dc4e9f",
                                    "HASREPLY":"y",
                                    "TYPE":"note",
                                    "RATEBYANNO":4,
                                    "CHILDREN":[
                                        {
                                            "ID":26,
                                            "DATECREATED":"2010-10-12",
                                            "DATEMODIFIED":"2010-10-12",
                                            "ANNOTATIONBODY":"my informative reply",
                                            "STRINGDESCRIPTION":"",
                                            "ANNOTATIONURI":"",
                                            "LEXICALSIGNATURE":null,
                                            "PAGENUMBER":1,
                                            "APPLICATION":"multivalent\/fab4",
                                            "VERSION":null,
                                            "RESOURCEID":21,
                                            "PERSONID":22,
                                            "ANNOFABID":"keen-3137bcd1ef90f053",
                                            "REPLYTO":25,
                                            "REPLYTOFABID":"eleni-5181f3f62a52e578",
                                            "HASREPLY":"n",
                                            "TYPE":"note",
                                            "RATEBYANNO":4,
                                            "CHILDREN":[]
                                        }
                                    ]
                                },
                                {
                                    "ID":28,
                                    "DATECREATED":"2010-10-12",
                                    "DATEMODIFIED":"2010-10-12",
                                    "ANNOTATIONBODY":"reply to eleni`s comment",
                                    "STRINGDESCRIPTION":"",
                                    "ANNOTATIONURI":"",
                                    "LEXICALSIGNATURE":null,
                                    "PAGENUMBER":1,
                                    "APPLICATION":"multivalent\/fab4",
                                    "VERSION":null,
                                    "RESOURCEID":21,
                                    "PERSONID":23,
                                    "ANNOFABID":"keen-2684eca1b29e184a",
                                    "REPLYTO":23,
                                    "REPLYTOFABID":"eleni-1f8a264404dc4e9f",
                                    "HASREPLY":"n",
                                    "TYPE":"note",
                                    "RATEBYANNO":3,
                                    "CHILDREN":[]
                                }
                            ]
                        },
                        {
                            "ID":33,
                            "DATECREATED":"2010-10-12",
                            "DATEMODIFIED":"2010-10-12",
                            "ANNOTATIONBODY":"this is my first note<br/><b>and this is another line</b>"
                            ,"STRINGDESCRIPTION":"",
                            "ANNOTATIONURI":"",
                            "LEXICALSIGNATURE":null,
                            "PAGENUMBER":1,
                            "APPLICATION":"multivalent\/fab4",
                            "VERSION":null,
                            "RESOURCEID":21,
                            "PERSONID":22,
                            "ANNOFABID":"eleni-1f8a264404dc4e9f",
                            "REPLYTO":null,
                            "REPLYTOFABID":null,
                            "HASREPLY":"y",
                            "TYPE":"note",
                            "RATEBYANNO":2,
                            "CHILDREN":[
                                {
                                    "ID":25,
                                    "DATECREATED":"2010-10-12",
                                    "DATEMODIFIED":"2010-10-12",
                                    "ANNOTATIONBODY":"it's a reply to the first comment",
                                    "STRINGDESCRIPTION":"",
                                    "ANNOTATIONURI":"",
                                    "LEXICALSIGNATURE":null,
                                    "PAGENUMBER":1,
                                    "APPLICATION":"multivalent\/fab4",
                                    "VERSION":null,
                                    "RESOURCEID":21,
                                    "PERSONID":21,
                                    "ANNOFABID":"eleni-5181f3f62a52e578",
                                    "REPLYTO":23,
                                    "REPLYTOFABID":"eleni-1f8a264404dc4e9f",
                                    "HASREPLY":"y",
                                    "TYPE":"note",
                                    "RATEBYANNO":4,
                                    "CHILDREN":[
                                        {
                                            "ID":26,
                                            "DATECREATED":"2010-10-12",
                                            "DATEMODIFIED":"2010-10-12",
                                            "ANNOTATIONBODY":"my informative reply",
                                            "STRINGDESCRIPTION":"",
                                            "ANNOTATIONURI":"",
                                            "LEXICALSIGNATURE":null,
                                            "PAGENUMBER":1,
                                            "APPLICATION":"multivalent\/fab4",
                                            "VERSION":null,
                                            "RESOURCEID":21,
                                            "PERSONID":22,
                                            "ANNOFABID":"keen-3137bcd1ef90f053",
                                            "REPLYTO":25,
                                            "REPLYTOFABID":"eleni-5181f3f62a52e578",
                                            "HASREPLY":"n",
                                            "TYPE":"note",
                                            "RATEBYANNO":4,
                                            "CHILDREN":[]
                                        }
                                    ]
                                },
                                {
                                    "ID":28,
                                    "DATECREATED":"2010-10-12",
                                    "DATEMODIFIED":"2010-10-12",
                                    "ANNOTATIONBODY":"reply to eleni`s comment",
                                    "STRINGDESCRIPTION":"",
                                    "ANNOTATIONURI":"",
                                    "LEXICALSIGNATURE":null,
                                    "PAGENUMBER":1,
                                    "APPLICATION":"multivalent\/fab4",
                                    "VERSION":null,
                                    "RESOURCEID":21,
                                    "PERSONID":22,
                                    "ANNOFABID":"keen-2684eca1b29e184a",
                                    "REPLYTO":23,
                                    "REPLYTOFABID":"eleni-1f8a264404dc4e9f",
                                    "HASREPLY":"n",
                                    "TYPE":"note",
                                    "RATEBYANNO":3,
                                    "CHILDREN":[]
                                }
                            ]
                        },
                        {
                            "ID":43,
                            "DATECREATED":"2010-10-13",
                            "DATEMODIFIED":"2010-10-13",
                            "ANNOTATIONBODY":"this is my first note<br/><b>and this is another line</b>"
                            ,"STRINGDESCRIPTION":"",
                            "ANNOTATIONURI":"",
                            "LEXICALSIGNATURE":null,
                            "PAGENUMBER":1,
                            "APPLICATION":"multivalent\/fab4",
                            "VERSION":null,
                            "RESOURCEID":21,
                            "PERSONID":23,
                            "ANNOFABID":"eleni-1f8a264404dc4e9f",
                            "REPLYTO":null,
                            "REPLYTOFABID":null,
                            "HASREPLY":"y",
                            "TYPE":"note",
                            "RATEBYANNO":3,
                            "CHILDREN":[
                                {
                                    "ID":25,
                                    "DATECREATED":"2010-10-12",
                                    "DATEMODIFIED":"2010-10-12",
                                    "ANNOTATIONBODY":"it's a reply to the first comment",
                                    "STRINGDESCRIPTION":"",
                                    "ANNOTATIONURI":"",
                                    "LEXICALSIGNATURE":null,
                                    "PAGENUMBER":1,
                                    "APPLICATION":"multivalent\/fab4",
                                    "VERSION":null,
                                    "RESOURCEID":21,
                                    "PERSONID":24,
                                    "ANNOFABID":"eleni-5181f3f62a52e578",
                                    "REPLYTO":23,
                                    "REPLYTOFABID":"eleni-1f8a264404dc4e9f",
                                    "HASREPLY":"y",
                                    "TYPE":"note",
                                    "RATEBYANNO":4,
                                    "CHILDREN":[
                                        {
                                            "ID":26,
                                            "DATECREATED":"2010-10-12",
                                            "DATEMODIFIED":"2010-10-12",
                                            "ANNOTATIONBODY":"my informative reply",
                                            "STRINGDESCRIPTION":"",
                                            "ANNOTATIONURI":"",
                                            "LEXICALSIGNATURE":null,
                                            "PAGENUMBER":1,
                                            "APPLICATION":"multivalent\/fab4",
                                            "VERSION":null,
                                            "RESOURCEID":21,
                                            "PERSONID":23,
                                            "ANNOFABID":"keen-3137bcd1ef90f053",
                                            "REPLYTO":25,
                                            "REPLYTOFABID":"eleni-5181f3f62a52e578",
                                            "HASREPLY":"n",
                                            "TYPE":"note",
                                            "RATEBYANNO":4,
                                            "CHILDREN":[]
                                        }
                                    ]
                                },
                                {
                                    "ID":28,
                                    "DATECREATED":"2010-10-12",
                                    "DATEMODIFIED":"2010-10-12",
                                    "ANNOTATIONBODY":"reply to eleni`s comment",
                                    "STRINGDESCRIPTION":"",
                                    "ANNOTATIONURI":"",
                                    "LEXICALSIGNATURE":null,
                                    "PAGENUMBER":1,
                                    "APPLICATION":"multivalent\/fab4",
                                    "VERSION":null,
                                    "RESOURCEID":21,
                                    "PERSONID":24,
                                    "ANNOFABID":"keen-2684eca1b29e184a",
                                    "REPLYTO":23,
                                    "REPLYTOFABID":"eleni-1f8a264404dc4e9f",
                                    "HASREPLY":"n",
                                    "TYPE":"note",
                                    "RATEBYANNO":3,
                                    "CHILDREN":[]
                                }
                            ]
                        }
                    ];
                //sample data structure
                var root_comment = {
                    "Id": "1",
                    "Author": "Author 1",
                    "ANNOTATIONBODY": "ANNOTATIONBODY 1",
                    "CHILDREN":[
                        {
                          "Id": "2",
                          "Author": "Author 2",
                          "ANNOTATIONBODY": "ANNOTATIONBODY 2",
                          "CHILDREN":[
                              {
                                "Id": "3",
                                "Author": "Author 3",
                                "ANNOTATIONBODY": "ANNOTATIONBODY 3",
                                "CHILDREN":[]
                              },
                              {
                                "Id": "4",
                                "Author": "Author 4",
                                "ANNOTATIONBODY": "ANNOTATIONBODY 4",
                                "CHILDREN":[]
                              }
                          ]
                        },
                        {
                          "Id": "5",
                          "Author": "Author 5",
                          "ANNOTATIONBODY": "ANNOTATIONBODY 5",
                          "CHILDREN":[
                              {
                                "Id": "6",
                                "Author": "Author 6",
                                "ANNOTATIONBODY": "ANNOTATIONBODY 6",
                                "CHILDREN": []
                              },
                              {
                                "Id": "7",
                                "Author": "Author 7",
                                "ANNOTATIONBODY": "ANNOTATIONBODY 7",
                                "CHILDREN": [
                                    {
                                        "Id": "8",
                                        "Author": "Author 8",
                                        "ANNOTATIONBODY": "ANNOTATIONBODY 8",
                                        "CHILDREN": []
                                    },
                                    {
                                         "Id": "9",
                                        "Author": "Author 9",
                                        "ANNOTATIONBODY": "ANNOTATIONBODY 9",
                                        "CHILDREN": []
                                    }
                                ]
                              }
                          ]
                        }
                    ]

                };